const mounted = (el, binding: any) => {
    if (binding.value) {
        const width = binding.value + 'px'; // 根据传入值生成最大宽度
        // 超出最大宽度省略样式
        el.style['max-width'] = width;
    }
    el.style['overflow'] = 'hidden';
    el.style['text-overflow'] = 'ellipsis';
    el.style['white-space'] = 'nowrap';
};
const vFitText = {
    mounted
};
export const setupFitTextDirective = (app: any) => {
    app.directive('fitText', vFitText);
};
